@import '~antd/es/style/themes/default.less';

html,
body,
#root {
  min-width: 1280px;
  height: 100%;
  font-size: 14px;
  font-family: Helvetica Neue, PingFang SC, Hiragino Sans GB, Heiti SC, Microsoft YaHei,
    WenQuanYi Micro Hei, sans-serif;
  background-color: transparent;
}
// body {
//   background-color: #1c3a6a;
// }

button {
  position: relative;
  display: inline-block;
  height: 32px;
  padding: 4px 15px;
  color: rgba(0, 0, 0, 0.85);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5715;
  white-space: nowrap;
  text-align: center;
  background: #fff;
  background-image: none;
  border: 1px solid transparent;
  border-color: #d9d9d9;
  border-radius: 2px;
  //box-shadow: 0 2px 0 rgb(0 0 0 / 2%);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

p {
  margin: 0;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

.text-yellow {
  color: #fee500 !important;
}
.font-size-16 {
  font-size: 16px !important;
}
.text-pointer {
  cursor: pointer;
}

.icon-file-link {
  display: block;
  width: 16px;
  height: 16px;
  margin-right: 5px;
  background: url('~@/assets/pc/images/lecturer/icon-fj.png') no-repeat center / 100%;
}
.icon-video-link {
  display: block;
  width: 16px;
  height: 16px;
  margin-right: 5px;
  background: url('~@/assets/pc/images/lecturer/icon-video.png') no-repeat center / 100%;
}

.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
  left: unset;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;

    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;

        > span {
          display: block;
        }
      }
    }
  }
}

// Compatible with IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}

.ant-descriptions-row .ant-descriptions-item-content .ant-space-align-center {
  align-items: baseline;
}

.ant-pro-fixed-header {
  z-index: 1001 !important;
}

/* 滚动条 start */
::-webkit-scrollbar {
  width: 7px;
  height: 10px;
  background-color: #f5f5f5;
}

/* 定义滚动条轨道 内阴影+圆角 */
::-webkit-scrollbar-track {
  background: #1c3a6a;
}

/* 定义滑块 内阴影+圆角 */
::-webkit-scrollbar-thumb {
  background-color: #5371a1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #5e78a1;
  border-radius: 3px;
}
.ant-form-horizontal .ant-form-item-control {
  flex: 1 1 auto !important;
}
html {
  .ant-radio-disabled + span {
    color: rgba(255, 255, 255, 0.3);
  }
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
  }
  input[type='number'] {
    appearance: textfield;
  }
  .ant-pro-footer-bar {
    padding: 5px 24px;
  }

  // ie11 popover 箭头bug
  .ant-popover-arrow-content::before {
    display: none !important;
  }

  .cn-select-dropdown-container {
    color: #fff;
    background-color: #1c3a6a;
    .ant-select-item {
      color: #fff;
    }
    .ant-select-item-option-selected:not(.ant-select-item-option-disabled),
    .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
      background-color: #1587bd;
    }
  }

  // tabs 样式
  .my-tabs {
    height: 100%;
    .ant-tabs-nav-wrap {
      overflow: visible !important;
    }
    .ant-tabs-nav {
      margin-bottom: 0 !important;
      padding-left: 22px;

      .ant-tabs-nav-list {
        align-items: flex-end;
      }
    }

    .ant-tabs-tab {
      position: relative;
      margin: 0 12px 0 0 !important;
      padding: 7px 27px !important;
      color: #192c53 !important;
      font-size: 14px;
      background-color: #39598c;
      border-radius: 12px 12px 0 0;
    }

    .ant-tabs-tab-active {
      padding: 11px 27px !important;
      background-color: #192c53;

      .ant-tabs-tab-btn {
        color: #fff !important;
      }
    }

    .ant-tabs-nav::before {
      border: none !important;
    }

    .ant-tabs-ink-bar {
      display: none;
    }

    .ant-tabs-content {
      height: 100%;
      padding: 20px;
      background: #192c53;
      border-radius: 20px;
    }
  }

  // Spin
  .ant-spin-blur::after {
    opacity: 0 !important;
  }
  .ant-spin-spinning .ant-spin-dot-item {
    background-color: #fff;
  }

  // select
  .black-select {
    width: 100%;
    .ant-select-selector {
      height: 44px;
      color: #7688a5 !important;
      font-weight: 400 !important;
      font-size: 14px !important;
      font-family: PingFangSC-Regular, PingFang SC;
      background: #192c53 !important;
      border: 0 !important;
      border-radius: 10px !important;
    }
  }
  .ant-select:not(.ant-select-customize-input)
    .ant-select-selector
    .ant-select-selection-search-input {
    color: #fff !important;
  }
  // radio
  .c-radio {
    .ant-radio-wrapper {
      color: #fff;
      font-size: 14px;
    }
    .ant-radio-checked .ant-radio-inner {
      background-color: #29ba91;
      border-color: #29ba91;
    }
    .ant-radio-inner {
      width: 14px;
      height: 14px;
      background-color: transparent;
      border-color: #7688a5;
    }
    .ant-radio-inner::after {
      width: 12px;
      height: 12px;
      margin-top: -6px;
      margin-left: -6px;
      background-color: #fff;
    }

    .ant-form-item-control-input {
      min-height: auto;
    }
    .ant-radio-wrapper:hover .ant-radio,
    .ant-radio:hover .ant-radio-inner,
    .ant-radio-input:focus + .ant-radio-inner {
      border-color: #29ba91;
    }
  }

  .c-tooltip {
    &.c-tooltip-white {
      .ant-popover-buttons {
        text-align: center;
      }
      .ant-tooltip-arrow-content {
        background-color: #fff;
      }
      .ant-popover-inner,
      ant-tooltip-inner {
        color: #000;
        background-color: #fff;
        border-color: #fff;
        .ant-popover-inner-content,
        .ant-popover-message {
          color: #000;
        }
      }
    }
    .ant-tooltip-arrow-content {
      background-color: #657ba9;

      --antd-arrow-background-color: none;
    }
    .ant-tooltip-inner {
      width: auto;
      padding: 0;
      background: #2f5083;
      border: 1px solid #657ba9;
      border-radius: 6px;
      box-shadow: 0 23px 47px 0 rgba(4, 17, 39, 0.54);
    }
    .ant-popover-inner {
      color: #fff;
      background: #2f5083;
      border-color: #657ba9;
      .ant-popover-inner-content,
      .ant-popover-message {
        color: #fff;
      }
      .ant-popover-inner-content {
        padding: 6px 10px;
        border: 1px solid #657ba9;
        border-radius: 6px;
        box-shadow: 0 10px 35px 0 rgba(12, 29, 64, 0.53);
      }
      .ant-popover-message {
        padding-bottom: 7px;
      }
    }
  }
  ::-webkit-input-placeholder {
    color: #7688a5;
    font-weight: 400;
    font-family: PingFangSC-Regular, PingFang SC;
  }

  :-moz-placeholder {
    color: #7688a5;
    font-weight: 400;
    font-family: PingFangSC-Regular, PingFang SC;
  }

  :-ms-input-placeholder {
    color: #7688a5;
    font-weight: 400;
    font-family: PingFangSC-Regular, PingFang SC;
  }
  .ant-input:focus,
  .ant-input-focused {
    outline: 0;
    box-shadow: none;
  }
  .ant-picker-status-error.ant-picker,
  .ant-picker-status-error.ant-picker:not([disabled]):hover,
  .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input,
  .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover,
  .ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input)
    .ant-select-selector {
    background: #1c3a6a;
  }
  .c-input {
    .ant-input {
      color: #fff;
      font-weight: 400;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      background: #1c3a6a;
      border: 0;
      border-radius: 6px;
    }
    .ant-input-group-addon {
      background-color: #1c3a6a;
    }
    .ant-input-group {
      background: #1c3a6a;
    }
    .ant-input-group,
    .ant-select:not(.ant-select-customize-input) .ant-select-selector,
    .ant-input,
    .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input)
      .ant-select-selector {
      outline: 0 !important;
      box-shadow: none;
    }
    > .ant-input-group
      > .ant-input-group-addon:last-child
      .ant-input-search-button:not(.ant-btn-primary) {
      background: #1c3a6a;
      border: 0;
      > .anticon {
        color: #fff;
      }
    }
    .ant-select:not(.ant-select-customize-input) .ant-select-selector {
      background: #1c3a6a;
      border: 0;
      border-radius: 6px;
    }
    // .ant-select-single:not(.ant-select-customize-input)
    //   .ant-select-selector
    //   .ant-select-selection-search-input {
    //   height: 44px;
    // }
    .ant-select-single .ant-select-selector .ant-select-selection-item {
      color: #fff;
    }
    .ant-select-single .ant-select-selector .ant-select-selection-placeholder {
      color: #7688a5;
    }
    .ant-select-arrow {
      color: #7688a5;
    }

    .ant-checkbox-wrapper {
      color: #fff;
    }
  }
  .c-drawer-container {
    .ant-drawer-content {
      color: #fff;
      background-color: #2f5083;
      .ant-drawer-header {
        background-color: #2f5083;
      }
      .ant-drawer-footer {
        padding: 15px 10px;
        text-align: right;
        border-color: #49699a;
      }
      .ant-drawer-header {
        padding: 16px 20px;
        padding-right: 52px;
        border-color: #49699a;
        .ant-drawer-close {
          margin: 0;
          padding-left: 0;
          color: #fff;
        }
      }
      .ant-drawer-title {
        color: #fff;
        text-align: center;
      }
    }
  }
  .ant-switch {
    background: #3b5784;
    box-shadow: none;
  }
  .ant-switch.ant-switch-checked {
    background-color: #29ba91;
    .ant-switch-handle::before {
      background-color: #fff;
    }
  }
  .ant-switch-handle::before {
    background-color: #7688a5;
  }
  .ant-checkbox-inner,
  .ant-checkbox-indeterminate .ant-checkbox-inner {
    background-color: transparent;
    border-color: #fff;
    border-radius: 4px;
  }
  .ant-checkbox-indeterminate .ant-checkbox-inner::after {
    background-color: #29ba91;
  }
  .ant-checkbox-wrapper:hover .ant-checkbox-inner,
  .ant-checkbox:hover .ant-checkbox-inner,
  .ant-checkbox-input:focus + .ant-checkbox-inner {
    border-color: #29ba91;
  }
  .ant-checkbox-checked .ant-checkbox-inner {
    background-color: #29ba91;
    border-color: #29ba91;
  }
  .ant-checkbox:hover::after,
  .ant-checkbox-wrapper:hover .ant-checkbox::after {
    visibility: hidden;
  }
  .ant-btn-default {
    color: #fff;
    background: #4c70a8;
    border: 0;
  }
  .ant-btn-ghost {
    color: #fff !important;
    font-weight: 400;
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    background: rgba(37, 77, 248, 0.2) !important;
    border: 1px solid #254df8 !important;
    border-radius: 6px;
    &:hover {
      color: #fff !important;
      background: rgba(37, 77, 248, 0.32) !important;
    }
  }
  .ant-select-multiple .ant-select-selection-item {
    align-items: center;
    height: 30px;
    color: #fff;
    font-weight: 400;
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    background: #2f5083;
    border: 1px solid #192c53;
    border-radius: 6px;
  }
  .ant-select-multiple .ant-select-selection-item-remove {
    color: #fff;
    font-size: 14px;
  }
  .addon-yellow {
    .ant-input-group > .ant-input:first-child,
    .ant-input-group-addon:first-child {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }
    .ant-input-group-addon {
      color: #fee500;
      font-weight: 400;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      background-color: #1c3a6a;
      border: 0;
    }
  }
  .ant-picker,
  .ant-picker-focused {
    background-color: #1c3a6a;
    border: 0;
    outline: 0 !important;
    box-shadow: none;
  }
  .ant-picker-input > input,
  .ant-picker-suffix {
    color: #fff;
  }
}

.c-lecturer-chapter-modal-wrap-container {
  .ant-modal-content {
    color: #fff;
    font-weight: 400;
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC;
    background: #2f5083;
    border-radius: 6px;
    box-shadow: 1px 0 0 0 #3d5d8d;
    .ant-modal-body {
      padding: 0;
    }
    .ant-modal-footer {
      border-color: #3d5d8d;
    }
  }
  .ant-modal-close {
    .ant-modal-close-x {
      width: 46px;
      height: 46px;
      color: #fff;
      line-height: 46px;
    }
  }
}

.c-date-picker-container {
  &.ant-picker.ant-picker-disabled {
    background: #1c3a6a;
    opacity: 0.3;
    .ant-picker-input > input[disabled],
    .ant-picker-suffix {
      color: rgba(255, 255, 255, 0.3);
    }
  }
}

.homework-tooltip {
  .ant-tooltip-inner {
    background: #2f5083 !important;
  }
}

html {
  .c-cascader-container {
    color: #fff;
    font-weight: 400;
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC;
    background: #1c3a6a;
    border: 1px solid #192c53;
    border-radius: 6px;
    box-shadow: 0 10px 35px 0 rgba(12, 29, 64, 0.53);
    .ant-cascader-menu-item:hover,
    .ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled),
    .ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled):hover {
      background: #254df8;
      border-radius: 4px;
    }
    .ant-cascader-menu-item-expand .ant-cascader-menu-item-expand-icon,
    .ant-cascader-menu-item-loading-icon {
      color: #fff;
    }
    .ant-cascader-menu {
      border-color: #192c53;
      &:last-child {
        border-color: transparent;
      }
    }
  }
  .ant-select-item-option-selected:not(.ant-select-item-option-disabled)
    .ant-select-item-option-state {
    color: #fff;
  }
  .ant-btn-ghost.cg-ghost-button {
    width: 74px;
    height: 30px;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px;
    &:hover {
      background: rgba(255, 255, 255, 0.1) !important;
    }
  }
}

.ant-select-clear {
  color: #fff !important;
  background-color: transparent !important;
}

.ant-select-dropdown {
  background-color: #1d3a67 !important;
  .ant-select-item {
    color: #fff !important;
  }
  .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    background-color: rgba(255, 255, 255, 0.3) !important;
  }
  .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }
}

.ant-modal-mask {
  z-index: 1311;
  background-color: rgba(6, 17, 39, 0.8) !important;
}
.ant-modal-wrap {
  z-index: 1312;
}
.ant-message {
  z-index: 1888;
}

html {
  .tox .tox-dialog {
    box-shadow: none;
  }
  //.tox .tox-split-button__chevron{
  //  display: none;
  //}
  .tox .tox-toolbar__primary {
    position: relative;
    // 防止出现...
    gap: 15px;
    width: 100%;
    padding: 10px 0;
  }
  .tox .tox-tbtn--select {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    &:hover {
      background: rgba(255, 255, 255, 0.2);
    }
  }
  .tox .tox-toolbar__group {
    &:not(:last-child) {
      position: relative;
      padding-right: 19px;
      // 防止出现...
      //margin-right: 15px;
      &:after {
        position: absolute;
        top: 50%;
        right: 0;
        width: 2px;
        height: 19px;
        margin-top: -9.5px;
        background: rgba(255, 255, 255, 0.3);
        content: ' ';
      }
    }
    &:nth-child(4) {
      margin-right: 0;
    }
    &:nth-child(4) {
      &:after {
        display: none;
      }
    }
    &:first-child {
      padding-left: 16px;
      > .tox-tbtn {
        &:nth-child(2) {
          padding-left: 15px;
        }
      }
    }
    &:last-child {
      //margin-left: auto;
      //margin-right: 12px;
      position: absolute;
      top: 10px;
      right: 12px;
      z-index: 1;
      .tox-tbtn {
        width: 88px;
      }
    }
    .tox-icon {
      border-radius: 4px;
      cursor: pointer;
      &:hover {
        background: rgba(255, 255, 255, 0.2);
      }
    }
  }
  .tox.tox-fullscreen .tox-toolbar__group {
    &:last-child {
      .tox-icon {
        background: rgba(255, 255, 255, 0.3);
      }
    }
  }
  .tox {
    .tox-split-button[title='文本颜色'],
    .tox-split-button[title='背景颜色'] {
      .tox-tbtn {
        width: auto;
        padding-left: 5px;
        + .tox-tbtn {
          width: 16px;
          padding-left: 0;
          &:hover {
            > svg {
              background: rgba(255, 255, 255, 0.2);
            }
          }
        }
      }
    }
  }
  .tox-shadowhost.tox-fullscreen,
  .tox.tox-tinymce.tox-fullscreen {
    z-index: 1090;
  }
  .tox .tox-tbtn--enabled {
    .tox-tbtn__icon-wrap {
      background: rgba(255, 255, 255, 0.3);
    }
  }
}
.ant-skeleton-active .ant-skeleton-title::after,
.ant-skeleton-active .ant-skeleton-paragraph > li::after,
.ant-skeleton-active .ant-skeleton-avatar::after,
.ant-skeleton-active .ant-skeleton-button::after,
.ant-skeleton-active .ant-skeleton-input::after,
.ant-skeleton-active .ant-skeleton-image::after {
  opacity: 0.5;
}

body {
  .ant-btn-dangerous.ant-btn-primary {
    background: rgba(255, 89, 103, 0.3);
    border-color: rgba(255, 89, 103, 1);
    &:hover {
      background: rgba(255, 89, 103, 0.5);
    }
  }
  .ant-switch-inner,
  .ant-switch-handle,
  .ant-switch-handle::before {
    transition: none !important;
  }
}
